package com.bytech.common.biz.exception;

import com.bytech.common.biz.entity.base.BlogResultStatus;
import lombok.Getter;

/**
 * @Author Zhao
 * @Create 2021/7/28 20:29
 */
@Getter
public class BlogApiGlobalRuntimeException extends RuntimeException {

    static final long serialVersionUID = -3387516993125229948L;

    private final BlogResultStatus resultStatus;

    public BlogApiGlobalRuntimeException(BlogResultStatus resultStatus) {
        super(resultStatus.getMessage());
        this.resultStatus = resultStatus;
    }

    public String getMessage() {
        return resultStatus.getMessage();
    }
}
